package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_wine_rotate;
import cn.bj.dao.Yxfw_wine_rotateMapper;

@Service
public class WineRotateService {
	@Autowired
	Yxfw_wine_rotateMapper yxfw_wine_rotateMapper;

	// 查询所有
	public List<Yxfw_wine_rotate> selectAllWineRotate() {
		return yxfw_wine_rotateMapper.selectByExample(null);
	}

	// 插入
	public int insertWineRotate(Yxfw_wine_rotate wineRotate) {
		return yxfw_wine_rotateMapper.insert(wineRotate);
	}

	// 删除
	public int deleteWineRotate(Integer id) {
		return yxfw_wine_rotateMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_wine_rotate selectById(Integer id) {
		return yxfw_wine_rotateMapper.selectByPrimaryKey(id);
	}

	// 修改
	public int updateWineR(Yxfw_wine_rotate wineR) {
		return yxfw_wine_rotateMapper.updateByPrimaryKey(wineR);
	}
}
